Skip to content

fix: add customized label on sponsor customized forms#974

Open
tomrndom wants to merge 1 commit into
masterfrom
fix/sponsor-forms-customized-label
Open

fix: add customized label on sponsor customized forms#974
tomrndom wants to merge 1 commit into
masterfrom
fix/sponsor-forms-customized-label

Conversation

@tomrndom

@tomrndom tomrndom commented Jun 11, 2026

Copy link
Copy Markdown

ref: https://app.clickup.com/t/86bad7927

image

Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com

Summary by CodeRabbit

  • New Features
    • Forms in the sponsor forms tab now display a visual "customized" indicator for customized forms, making them easier to distinguish at a glance.

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@tomrndom tomrndom requested a review from smarcet June 11, 2026 19:34
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 690864d9-6258-45c8-847f-e0f4b6ccdb56

📥 Commits

Reviewing files that changed from the base of the PR and between 2c21d1d and 74c2528.

📒 Files selected for processing (4)
  • src/actions/sponsor-forms-actions.js
  • src/i18n/en.json
  • src/pages/sponsors/sponsor-page/tabs/sponsor-forms-tab/index.js
  • src/reducers/sponsors/sponsor-page-forms-list-reducer.js

📝 Walkthrough

Walkthrough

This PR adds a visual "customized" indicator to sponsor form list items. The API request is extended to fetch original_show_form_id, the reducer stores this field, and the UI conditionally displays a Chip badge when the value exceeds zero, using an i18n translation key for the label.

Changes

Customized Forms Indicator

Layer / File(s) Summary
Data pipeline: fetch and store original_show_form_id
src/actions/sponsor-forms-actions.js, src/reducers/sponsors/sponsor-page-forms-list-reducer.js
API request for customized forms now includes original_show_form_id field, and the reducer maps this property into each customized form object in state.
UI customized indicator with translation
src/pages/sponsors/sponsor-page/tabs/sponsor-forms-tab/index.js, src/i18n/en.json
Sponsor forms tab imports Chip from MUI and updates the name column to conditionally render a "customized" badge when original_show_form_id > 0; translation key "customized": "CUSTOMIZED" is added for the badge label.

Sequence Diagram

sequenceDiagram
  participant Component as Sponsor Forms Tab
  participant API as Backend API
  participant Reducer as Forms Reducer
  Component->>API: getSponsorCustomizedForms<br/>(with original_show_form_id field)
  API-->>Component: Return forms + original_show_form_id
  Component->>Reducer: RECEIVE_SPONSOR_CUSTOMIZED_FORMS
  Reducer->>Reducer: Map original_show_form_id to each form
  Reducer-->>Component: Updated state with indicator field
  Component->>Component: Render name + Chip if<br/>original_show_form_id > 0
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • fntechgit/summit-admin#879: Updates useEffect in sponsor-forms-tab to re-fetch customized forms when sponsor ID changes, directly complementing the UI rendering logic in this PR.
  • fntechgit/summit-admin#873: Also extends getSponsorCustomizedForms API request parameters (adds expands field), making the action changes overlapping in scope.

Suggested reviewers

  • smarcet
  • romanetar

Poem

A badge appears so small and bright,
When forms are customized just right—
The rabbit hops through data's flow,
From API down to UI's glow! ✨🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a customized label to sponsor customized forms. It is concise, specific, and directly reflects the changeset modifications across all four files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sponsor-forms-customized-label

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed due to a network error.


Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant